package com.mango.leet.code.week2.game126;

import java.util.*;

/**
 * https://leetcode.cn/contest/biweekly-contest-126/problems/mark-elements-on-array-by-performing-queries/
 *
 * @Author: mango
 * @Date: 2024/3/16 23:02
 */
public class LC100209 {
    public long[] unmarkedSumArray(int[] nums, int[][] queries) {
        long[] result = new long[queries.length];
        boolean[] visited = new boolean[nums.length];
        Queue<int[]> queue = new PriorityQueue<>();
        int totalNum = 0;
        for (int i = 0; i < nums.length; i++) {
            totalNum += nums[i];
            queue.offer(new int[]{totalNum, i});
        }
        for (int i = 0; i < queries.length; i++) {
            int index = queries[i][0];
            int count = queries[i][1];
            int num = nums[index];
            // 没有被标记，则标记
            if (visited[index]) {
                visited[index] = true;
            }
            int j = 1;
            result[i] = 0;
        }
        return result;
    }
    public static void main(String[] args) {
//        int[] nums = {1,2,2,1,2,3,1};
//        int[][] queries = {{1,2},{3,3},{4,2}};
        int[] nums = {16,1,1,16,11,19,6,4,15,1,12,11,14,16,7,7,4,13,1,8};
        int[][] queries = {{17,3},{9,3},{11,4},{10,1},{7,1},{6,3},{2,3},{14,3},{4,2},{15,3}};

        LC100209 s = new LC100209();
        System.out.println(Arrays.toString(s.unmarkedSumArray(nums, queries)));
    }
}
